+Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
+ to get a GdkWindow to compare event->window to.
+
+ * gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
+ the signal for lateral motion too, #64361
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
+ arg as it is useless, #64137
+
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
+ to get a GdkWindow to compare event->window to.
+
+ * gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
+ the signal for lateral motion too, #64361
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
+ arg as it is useless, #64137
+
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
+ to get a GdkWindow to compare event->window to.
+
+ * gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
+ the signal for lateral motion too, #64361
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
+ arg as it is useless, #64137
+
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
+ to get a GdkWindow to compare event->window to.
+
+ * gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
+ the signal for lateral motion too, #64361
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
+ arg as it is useless, #64137
+
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
+ to get a GdkWindow to compare event->window to.
+
+ * gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
+ the signal for lateral motion too, #64361
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
+ arg as it is useless, #64137
+
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
+ to get a GdkWindow to compare event->window to.
+
+ * gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
+ the signal for lateral motion too, #64361
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
+ arg as it is useless, #64137
+
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+Thu Nov 15 16:24:55 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_bin_window): New function
+ to get a GdkWindow to compare event->window to.
+
+ * gtk/gtktreeview.c (gtk_tree_view_move_cursor_left_right): emit
+ the signal for lateral motion too, #64361
+
+ * gtk/gtktreeview.c (gtk_tree_view_get_path_at_pos): remove window
+ arg as it is useless, #64137
+
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
</para>
-<!-- ##### STRUCT GtkTreeModelSort ##### -->
-<para>
-
-</para>
-
-
<!-- ##### STRUCT GtkTreeSelectionClass ##### -->
<para>
@GTK_TREE_SELECTION_SINGLE:
@GTK_TREE_SELECTION_MULTI:
-<!-- ##### STRUCT GtkTreeView ##### -->
-<para>
-
-</para>
-
-@parent:
-@priv:
-
<!-- ##### USER_FUNCTION GtkTreeViewDraggableFunc ##### -->
<para>
#GtkTextView, #GtkTextIter, #GtkTextMark
</para>
+<!-- ##### STRUCT GtkTextBuffer ##### -->
+<para>
+
+</para>
+
+
<!-- ##### FUNCTION gtk_text_buffer_new ##### -->
<para>
</para>
-<!-- ##### STRUCT GtkTextBuffer ##### -->
-<para>
-
-</para>
-
-
<!-- ##### STRUCT GtkTextIter ##### -->
<para>
</para>
+<!-- ##### STRUCT GtkTextTagTable ##### -->
+<para>
+
+</para>
+
+
<!-- ##### USER_FUNCTION GtkTextTagTableForeach ##### -->
<para>
#GtkTreeView, #GtkTreeStore, #GtkListStore
</para>
+<!-- ##### STRUCT GtkTreeModel ##### -->
+<para>
+
+</para>
+
+
<!-- ##### STRUCT GtkTreeIter ##### -->
<para>
</para>
-<!-- ##### STRUCT GtkTreeModel ##### -->
-<para>
-
-</para>
-
-
<!-- ##### STRUCT GtkTreeModelIface ##### -->
<para>
</para>
+<!-- ##### STRUCT GtkTreeModelSort ##### -->
+<para>
+
+</para>
+
+
<!-- ##### FUNCTION gtk_tree_model_sort_new_with_model ##### -->
<para>
</para>
+<!-- ##### STRUCT GtkTreeSelection ##### -->
+<para>
+
+</para>
+
+
<!-- ##### USER_FUNCTION GtkTreeSelectionFunc ##### -->
<para>
</para>
+<!-- ##### STRUCT GtkTreeView ##### -->
+<para>
+
+</para>
+
+
<!-- ##### ENUM GtkTreeViewDropPosition ##### -->
<para>
tree_view->priv->pressed_button = -1;
gtk_tree_view_get_path_at_pos (tree_view,
- tree_view->priv->bin_window,
tree_view->priv->press_start_x,
tree_view->priv->press_start_y,
&path,
cursor_tree,
cursor_node,
NULL);
+ g_signal_emit (G_OBJECT (tree_view), tree_view_signals[CURSOR_CHANGED], 0);
}
gtk_tree_view_clamp_column_visible (tree_view, tree_view->priv->focus_column);
}
}
+/**
+ * gtk_tree_view_get_bin_window:
+ * @tree_view: A #GtkTreeView
+ *
+ * Returns the window that @tree_view renders to. This is used primarily to
+ * compare to <literal>event->window</literal> to confirm that the event on
+ * @tree_view is on the right window.
+ *
+ * Return value: A #GdkWindow, or %NULL when @tree_view hasn't been realized yet
+ **/
+GdkWindow *
+gtk_tree_view_get_bin_window (GtkTreeView *tree_view)
+{
+ g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL);
+
+ return tree_view->priv->bin_window;
+}
+
/**
* gtk_tree_view_get_path_at_pos:
* @tree_view: A #GtkTreeView.
- * @window: The #GdkWindow to check against.
* @x: The x position to be identified.
* @y: The y position to be identified.
* @path: A pointer to a #GtkTreePath pointer to be filled in, or %NULL
* @cell_x: A pointer where the X coordinate relative to the cell can be placed, or %NULL
* @cell_y: A pointer where the Y coordinate relative to the cell can be placed, or %NULL
*
- * Finds the path at the point (@x, @y) relative to @window. If @window is
- * %NULL, then the point is found relative to the widget coordinates. This
- * function is expected to be called after an event, with <literal>event->window</literal> being
- * passed in as @window. It is primarily for things like popup menus. If @path
- * is non-%NULL, then it will be filled with the #GtkTreePath at that point.
- * This path should be freed with gtk_tree_path_free(). If @column is non-%NULL,
- * then it will be filled with the column at that point. @cell_x and @cell_y
- * return the coordinates relative to the cell background (i.e. the
- * @background_area passed to gtk_cell_renderer_render()). This function only
- * works if @tree_view is realized.
+ * Finds the path at the point (@x, @y), relative to widget coordinates. That
+ * is, @x and @y are relative to an events coordinates. It is primarily for
+ * things like popup menus. If @path is non-%NULL, then it will be filled with
+ * the #GtkTreePath at that point. This path should be freed with
+ * gtk_tree_path_free(). If @column is non-%NULL, then it will be filled with
+ * the column at that point. @cell_x and @cell_y return the coordinates relative
+ * to the cell background (i.e. the @background_area passed to
+ * gtk_cell_renderer_render()). This function is only meaningful if @tree_view
+ * is realized.
*
* Return value: %TRUE if a row exists at that coordinate.
**/
gboolean
gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
- GdkWindow *window,
gint x,
gint y,
GtkTreePath **path,
g_return_val_if_fail (tree_view != NULL, FALSE);
g_return_val_if_fail (tree_view->priv->bin_window != NULL, FALSE);
- if (window)
- g_return_val_if_fail (window == tree_view->priv->bin_window, FALSE);
-
if (path)
*path = NULL;
if (column)
}
}
- if (window)
- {
- y_offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
- TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y),
- &tree, &node);
- }
- else
- {
- if (y < TREE_VIEW_HEADER_HEIGHT (tree_view))
- return FALSE;
+ if (y < TREE_VIEW_HEADER_HEIGHT (tree_view))
+ return FALSE;
- y_offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
- TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y + tree_view->priv->vadjustment->value),
- &tree, &node);
- }
+ y_offset = _gtk_rbtree_find_offset (tree_view->priv->tree,
+ TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, y + tree_view->priv->vadjustment->value),
+ &tree, &node);
if (tree == NULL)
return FALSE;
*/
if (!gtk_tree_view_get_path_at_pos (tree_view,
- tree_view->priv->bin_window,
x, y,
&tmp_path,
&column,
/* Layout information */
gboolean gtk_tree_view_get_path_at_pos (GtkTreeView *tree_view,
- GdkWindow *window,
gint x,
gint y,
GtkTreePath **path,